<!DOCTYPE HTML>
<html lang="en-us">
  <head>
    <title>advanced $script.js example</title>
    <script src="../src/script.js"></script>
    <script type="text/javascript">
    // load all files asynchronously!
    var script = $script;
    script.path('js/');

    script('foo', 'main'); // main dependency

    script(['bar', 'baz'], 'plugin'); // bar & baz rely on 'main'

    script('thunk'); // thunk relies on 'plugin'

    script('foo', function () {
      console.log('got foo again. called back');
    });

    </script>
  </head>
  <body></body>
</html>
